//
//  WHHomeMenuCell.m
//  SquirrelSeller
//
//  Created by 邓伟浩 on 2019/1/2.
//  Copyright © 2019 邓伟浩. All rights reserved.
//

#import "WHHomeMenuCell.h"

@interface WHHomeMenuCell ()

@end

@implementation WHHomeMenuCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        self.contentView.backgroundColor = KWhiteColor;
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI {
    [self.contentView addSubview:({
        _tipsImageView = [[UIImageView alloc] init];
        _tipsImageView.contentMode = UIViewContentModeScaleAspectFit;
        
        _tipsImageView;
    })];
    [_tipsImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.height.mas_equalTo(kRealwidth(50));
        make.centerX.mas_equalTo(self.contentView.mas_centerX);
        make.top.mas_equalTo(self.contentView.mas_top).offset(kRealwidth(20));
    }];
    
    [self.contentView addSubview:({
        _tipsLabel = [[UILabel alloc] init];
        _tipsLabel.textAlignment = NSTextAlignmentCenter;
        _tipsLabel.font = SYSTEMFONT(kRealwidth(15));
        _tipsLabel.textColor = CFontTitleBlackColor;
        
        _tipsLabel;
    })];
    [_tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_tipsImageView.mas_bottom).offset(kRealwidth(15));
        make.centerX.mas_equalTo(self.contentView.mas_centerX);
        make.height.mas_equalTo(kRealwidth(15));
    }];
    
    
}

- (void)prepareForReuse {
    [super prepareForReuse];
    _tipsLabel.text = @"";
    _tipsImageView.image = nil;
}

@end
